package com.ljy.tkmodel.controller;


import com.ljy.tkmodel.entity.CourseClassification;
import com.ljy.tkmodel.service.CourseClassificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-03-08
 */
@RestController
@RequestMapping("/course-classification")
public class CourseClassificationController {
    @Autowired
    CourseClassificationService classificationService;

    @PostMapping("saveCourseClassification")
    public int saveCourseClassification(CourseClassification classification){
            return classificationService.insertCourseClassification(classification);
    }

    @GetMapping("queryConditionCourseClassification")
    public List<CourseClassification> queryConditionCourseClassification(Map map){
        return classificationService.selectCourseClassification(map);
    }
}

